ksTCrealLoop <- function(direc, variable){
	kspvec <- array(NA)
	for(i in 1:length(dir(direc))){
		currentExp <- paste(direc, "/sim", i, ".RData", sep = "")
		load(currentExp)
		ks.pval <- ks.test(bdata$orig[bdata$orig$Tr == "Treatment 1", variable], bdata$orig[bdata$orig$Tr == "Treatment 2", variable])$p.value
		kspvec[i] <- ks.pval
	}
   return(kspvec)
}